package com.zoe.vhr.service.impl;

import com.zoe.vhr.mapper.MailSendLogMapper;
import com.zoe.vhr.model.MailSendLog;
import com.zoe.vhr.service.MailSendLogService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Date;
import java.util.List;

/**
 * @author zoe.Zhang
 * @date 2023/01/04
 * @description $description
 */
@Service
public class MailSendLogServiceImpl implements MailSendLogService {

    @Resource
    private MailSendLogMapper mailSendLogMapper;

    @Override
    public int insert(MailSendLog record) {
        return mailSendLogMapper.insert(record);
    }

    @Override
    public int insertSelective(MailSendLog record) {
        return mailSendLogMapper.insertSelective(record);
    }

    @Override
    public int updateSendLog(String msgId, Integer status) {
        return mailSendLogMapper.updateSendLog(msgId, status);
    }

    @Override
    public List<MailSendLog> getMailLogByStatus() {
        return mailSendLogMapper.getMailLogByStatus();
    }

    @Override
    public int updateSendLogCountAndTryTime(String msgId, Date retryTime) {
        return mailSendLogMapper.updateSendLogAndTryTime(msgId, retryTime);
    }
}

